package uumoi

class Product {
	Long parentId
	String parentName
	Long collectionId
	String collectionName

	Date startDate
	Date endDate
	Integer versionNumber

	String identifier
	String sku
	String name
	Integer GTIN

	Sizing sizing
	Size size
	Color mainColor
	Integer numberOfUnits

	ProductDimensions dimensions

	String description
	Language language

	static hasMany = [variants: Product, parts: Product, properties: Property, groups: ProductGroup, availableColors: Color, tags: HashTag, images: LocalisedImage]

	static constraints = {
	}

	static mapping = {
		variants fetch: 'join'
		tags fetch: 'join'
		groups fetch: 'join'
	}

	static localisedFields = ['name', 'description', 'images', 'availableColors', 'mainColor']
}
